package cn.ryh.fileupload.entity;

import com.fasterxml.jackson.annotation.JsonInclude;

/**
 * @author Rao
 */
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class Failure extends Result {

    private Boolean success = Boolean.FALSE;

    private String message;

    private Object[] params;

    private Throwable errorStack;

    public Failure() {
    }

    public Failure(String message) {
        this.message = message;
    }

    public Failure(String message, Throwable errorStack) {
        this(message);
        this.errorStack = errorStack;
    }

    public Failure(String message, Object[] params) {
        this(message);
        this.params = params;
    }

    @Override
    public Boolean getSuccess() {
        return success;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public Object[] getParams() {
        return params;
    }

    public Throwable getErrorStack() {
        return errorStack;
    }
}
